import Cookies from 'js-cookie'

const AccessTokenKey = 'open_admin_access_token'
const RefreshTokenKey = 'open_admin_refresh_token'

/* 访问token */
export function getAccessToken() {
  return Cookies.get(AccessTokenKey)
}

export function setAccessToken(accessToken) {
  return Cookies.set(AccessTokenKey, accessToken)
}

export function removeAccessToken() {
  return Cookies.remove(AccessTokenKey)
}

/* 刷新token */
export function getRefreshToken() {
  return Cookies.get(RefreshTokenKey)
}

export function setRefreshToken(refreshToken) {
  return Cookies.set(RefreshTokenKey, refreshToken)
}

export function removeRefreshToken() {
  return Cookies.remove(RefreshTokenKey)
}
